package com.ruoyi.service.impl;

import com.ruoyi.domain.RepositoryInfo;
import com.ruoyi.mapper.RepositoryInfoMapper;
import com.ruoyi.service.IRepositoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RepositoryInfoServiceImpl implements IRepositoryInfoService {

    @Autowired
    private RepositoryInfoMapper repositoryInfoMapper;

    @Override
    public List<RepositoryInfo> selectRepositoryInfoList(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.selectList(repositoryInfo);
    }

    @Override
    public RepositoryInfo selectRepositoryInfoById(Long repositoryId) {
        return repositoryInfoMapper.selectByPrimaryKey(repositoryId);
    }

    @Override
    public int insertRepositoryInfo(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.insertSelective(repositoryInfo);
    }

    @Override
    public int updateRepositoryInfo(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.updateByPrimaryKeySelective(repositoryInfo);
    }

    @Override
    public int deleteRepositoryInfoByIds(Long[] repositoryIds) {
        return repositoryInfoMapper.deleteByPrimaryKeys(repositoryIds);
    }
}
